package com.shangguosha.core.event;

import com.shangguosha.model.enums.GamePhase;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 游戏状态相关事件
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GameStateEvent extends GameEvent {
    private GamePhase phase;
    private Object oldState;
    private Object newState;
    private Object data;
    
    public GameStateEvent(String eventType, Object source) {
        super(eventType, source);
    }
    
    public GameStateEvent(String eventType, Object source, GamePhase phase) {
        super(eventType, source);
        this.phase = phase;
    }
    
    public GameStateEvent(String eventType, Object source, Object oldState, Object newState) {
        super(eventType, source);
        this.oldState = oldState;
        this.newState = newState;
    }
    
    public GameStateEvent(String eventType, Object source, GamePhase phase, Object oldState, Object newState, Object data) {
        super(eventType, source);
        this.phase = phase;
        this.oldState = oldState;
        this.newState = newState;
        this.data = data;
    }
}